﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;



public class VertexAnimationMgr  {
	static VertexAnimationMgr instance;
	public static VertexAnimationMgr Instance{
		get{ 
			if (instance == null)
				instance = new VertexAnimationMgr ();
			return instance;
		}	
	}
	public Dictionary<string,VertexAnimationData> animations = new Dictionary<string, VertexAnimationData>();

	public VertexAnimationData GetClip(string name){
		if (!animations.ContainsKey (name)) {
			VertexAnimationData clip = Resources.Load<VertexAnimationData>("Model/" + name+"_clip");
			clip.Awake ();
			animations.Add (name, clip);
		}
		return animations [name];
	}
}
